package com.truyen.service;

import java.util.List;

import com.truyen.persistence.entity.ChapterTmpTruyenKiemHiep;
import com.truyen.persistence.entity.TruyenKiemHiep;
import com.truyen.utils.PagingInfo;


public interface ChapterTmpTruyenKiemHiepService {
	
	// tao moi
	void save(ChapterTmpTruyenKiemHiep entity);

	//tim theo id
	ChapterTmpTruyenKiemHiep findById(Long id);

	//lay tat ca
	List<ChapterTmpTruyenKiemHiep> getAll();

	//tim chapter theo column name
	ChapterTmpTruyenKiemHiep findByProperty(String column, Object value);

	//lay danh sach chapter theo truyen va kw
	List<ChapterTmpTruyenKiemHiep> getLstChapterByTruyen(TruyenKiemHiep entity, String kwSearch, String sort, String sortBy, PagingInfo pInfo);

	//tim chapter theo truyen va alias
	ChapterTmpTruyenKiemHiep findAliasvTruyen(TruyenKiemHiep entity, String alias);

	//lay tat ca danh sach chapter theo kw , theo noi dung null hoac khong, sap xep va phan trang
	List<ChapterTmpTruyenKiemHiep> getLstAllChapterTmpTruyenKiemHiep(String kwSearch, String sort, String sortBy, PagingInfo pInfo);

	//cap nhat lai chapter number
	void updateChapterNumber(Long id, float chapterNumberChange);

	//lay danh sach chapter theo truyen
	List<ChapterTmpTruyenKiemHiep> getByTruyen(TruyenKiemHiep entity);

	//tim chapter theo truyen va chapter number
	ChapterTmpTruyenKiemHiep getChapterByTruyenChapnumber(TruyenKiemHiep entity,	float chapterNumber);
	
	//xoa chapter truyen
	void delete(long id);

	//lay danh sach chapter moi
	List<ChapterTmpTruyenKiemHiep> getListNewChapter(int maxLimit);

	//update theo chapter truyen
	void update(Long id, Float chapterNumber);

	//lay danh sach cac chapter moi cap nhat
	List<ChapterTmpTruyenKiemHiep> getLstByOrderBy(String columnOrderBy, PagingInfo pInfo);

	//phan trang danh sach chapter ngoai trang info
	List<ChapterTmpTruyenKiemHiep> getByTruyenPaging(TruyenKiemHiep entity, PagingInfo pInfoChapter);

	//tim chapter truyen theo chapter number va truyen
	ChapterTmpTruyenKiemHiep findByTruyenChapterNumber(TruyenKiemHiep entity,	float chapterNumber);
	
	//lay danh sach chapter theo truyen
	List<Object> getByIdTruyen(Long idTruyen);
}
